package com.rock.code.common.utils.domain;

import com.rock.code.system.roleModule.domain.TbSysRoleModule;

import java.io.Serializable;
import java.util.List;

/**
 * Created by colo on 2018/2/11.
 */
public class MenuOptions implements Serializable {

    private String add = "hidden";
    private String delete = "hidden";
    private String update = "hidden";
    private String view = "hidden";
    private String exp = "hidden";
    private String relConf = "hidden";
    private String resTempImp = "hidden";
    private String resTempDown = "hidden";
    private String resChg = "hidden";
    private String chgHist = "hidden";

    public MenuOptions(){

    }

    public MenuOptions(List<TbSysRoleModule> tbSysRolesMenus){
        for (TbSysRoleModule tbSysRolesMenu : tbSysRolesMenus) {
            switch (tbSysRolesMenu.getOptType()){
                case 1:
                    this.add = "show";
                    break;
                case 2:
                    this.delete = "show";
                    break;
                case 3:
                    this.update = "show";
                    break;
                case 4:
                    this.view = "show";
                    break;
                case 6:
                    this.exp = "show";
                    break;
                case 8:
                    this.resChg = "show";
                    break;
                case 9:
                    this.chgHist = "show";
                    break;
                case 14:
                    this.relConf = "show";
                    break;
                case 16:
                    this.resTempImp = "show";
                    break;
                case 17:
                    this.resTempDown = "show";
                    break;
                default:
                    break;
            }
        }
    }


    public String getAdd() {
        return add;
    }

    public void setAdd(String add) {
        this.add = add;
    }

    public String getDelete() {
        return delete;
    }

    public void setDelete(String delete) {
        this.delete = delete;
    }

    public String getUpdate() {
        return update;
    }

    public void setUpdate(String update) {
        this.update = update;
    }

    public String getView() {
        return view;
    }

    public void setView(String view) {
        this.view = view;
    }

    public String getRelConf() {
        return relConf;
    }

    public void setRelConf(String relConf) {
        this.relConf = relConf;
    }

    public String getResTempImp() {
        return resTempImp;
    }

    public void setResTempImp(String resTempImp) {
        this.resTempImp = resTempImp;
    }

    public String getResTempDown() {
        return resTempDown;
    }

    public void setResTempDown(String resTempDown) {
        this.resTempDown = resTempDown;
    }

    public String getResChg() {
        return resChg;
    }

    public void setResChg(String resChg) {
        this.resChg = resChg;
    }

    public String getChgHist() {
        return chgHist;
    }

    public void setChgHist(String chgHist) {
        this.chgHist = chgHist;
    }

    public String getExp() {
        return exp;
    }

    public void setExp(String exp) {
        this.exp = exp;
    }
}
